package com.yami.shop.bean.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用于存储用户之间的私信
 * </p>
 *
 * @author EXiaoKe
 * @since 2025-04-14
 */
@Getter
@Setter
@ToString
@TableName("tz_messages")
public class TzMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 消息的唯一标识符
     */
    @TableId(value = "message_id", type = IdType.AUTO)
    private Long messageId;

    /**
     * 发送者用户ID
     */
    private String senderId;

    /**
     * 接收者用户ID
     */
    private String receiverId;

    /**
     * 消息内容
     */
    private String content;

    /**
     * 发送时间
     */
    private LocalDateTime createdAt;

    /**
     * 消息状态（已读、未读）
     */
    private String status;
}
